load("@rules_java//java:defs.bzl", "java_library")
load("//:cel_android_rules.bzl", "cel_android_library")

package(
    default_applicable_licenses = ["//:license"],
    default_visibility = ["//visibility:public"],
)

java_library(
    name = "runtime",
    exports = [
        ":evaluation_exception",
        ":late_function_binding",
        "//runtime/src/main/java/dev/cel/runtime",
        "//runtime/src/main/java/dev/cel/runtime:descriptor_message_provider",
        "//runtime/src/main/java/dev/cel/runtime:function_overload",
        "//runtime/src/main/java/dev/cel/runtime:metadata",
        "//runtime/src/main/java/dev/cel/runtime:runtime_type_provider",
    ],
)

java_library(
    name = "dispatcher",
    visibility = ["//:internal"],
    exports = [
        "//runtime/src/main/java/dev/cel/runtime:dispatcher",
    ],
)

java_library(
    name = "standard_functions",
    exports = [
        "//runtime/src/main/java/dev/cel/runtime:standard_functions",
    ],
)

java_library(
    name = "activation",
    visibility = ["//:internal"],
    exports = [
        "//runtime/src/main/java/dev/cel/runtime:activation",
    ],
)

java_library(
    name = "proto_message_activation_factory",
    visibility = ["//:internal"],
    exports = [
        "//runtime/src/main/java/dev/cel/runtime:proto_message_activation_factory",
    ],
)

java_library(
    name = "function_binding",
    exports = ["//runtime/src/main/java/dev/cel/runtime:function_binding"],
)

cel_android_library(
    name = "function_binding_android",
    exports = ["//runtime/src/main/java/dev/cel/runtime:function_binding_android"],
)

java_library(
    name = "late_function_binding",
    exports = ["//runtime/src/main/java/dev/cel/runtime:late_function_binding"],
)

java_library(
    name = "function_resolver",
    visibility = ["//:internal"],
    exports = ["//runtime/src/main/java/dev/cel/runtime:function_resolver"],
)

cel_android_library(
    name = "late_function_binding_android",
    exports = ["//runtime/src/main/java/dev/cel/runtime:late_function_binding_android"],
)

java_library(
    name = "function_overload_impl",
    visibility = ["//:internal"],
    exports = ["//runtime/src/main/java/dev/cel/runtime:function_overload_impl"],
)

java_library(
    name = "evaluation_exception_builder",
    exports = ["//runtime/src/main/java/dev/cel/runtime:evaluation_exception_builder"],
)

java_library(
    name = "lite_runtime",
    visibility = ["//:internal"],
    exports = ["//runtime/src/main/java/dev/cel/runtime:lite_runtime"],
)

java_library(
    name = "lite_runtime_factory",
    visibility = ["//:internal"],
    exports = ["//runtime/src/main/java/dev/cel/runtime:lite_runtime_factory"],
)

java_library(
    name = "evaluation_exception",
    # used_by_android
    exports = ["//runtime/src/main/java/dev/cel/runtime:evaluation_exception"],
)

java_library(
    name = "interpreter",
    deprecation = "Please use CEL-Java Fluent APIs //runtime:runtime instead",
    exports = ["//runtime/src/main/java/dev/cel/runtime:interpreter"],
)

java_library(
    name = "interpretable",
    visibility = ["//:internal"],
    exports = ["//runtime/src/main/java/dev/cel/runtime:interpretable"],
)

java_library(
    name = "runtime_helpers",
    visibility = ["//:internal"],
    exports = ["//runtime/src/main/java/dev/cel/runtime:runtime_helpers"],
)

cel_android_library(
    name = "runtime_helpers_android",
    visibility = ["//:internal"],
    exports = ["//runtime/src/main/java/dev/cel/runtime:runtime_helpers_android"],
)

java_library(
    name = "proto_message_runtime_helpers",
    visibility = ["//:internal"],
    exports = ["//runtime/src/main/java/dev/cel/runtime:proto_message_runtime_helpers"],
)

java_library(
    name = "runtime_equality",
    visibility = ["//:internal"],
    exports = ["//runtime/src/main/java/dev/cel/runtime:runtime_equality"],
)

cel_android_library(
    name = "runtime_equality_android",
    visibility = ["//:internal"],
    exports = ["//runtime/src/main/java/dev/cel/runtime:runtime_equality_android"],
)

java_library(
    name = "proto_message_runtime_equality",
    visibility = ["//:internal"],
    exports = ["//runtime/src/main/java/dev/cel/runtime:proto_message_runtime_equality"],
)

java_library(
    name = "type_resolver",
    visibility = ["//:internal"],
    exports = ["//runtime/src/main/java/dev/cel/runtime:type_resolver"],
)

java_library(
    name = "unknown_attributes",
    exports = ["//runtime/src/main/java/dev/cel/runtime:unknown_attributes"],
)

cel_android_library(
    name = "unknown_attributes_android",
    exports = ["//runtime/src/main/java/dev/cel/runtime:unknown_attributes_android"],
)

java_library(
    name = "unknown_options",
    exports = ["//runtime/src/main/java/dev/cel/runtime:unknown_options"],
)

java_library(
    name = "interpreter_util",
    exports = ["//runtime/src/main/java/dev/cel/runtime:interpreter_util"],
)

java_library(
    name = "evaluation_listener",
    exports = ["//runtime/src/main/java/dev/cel/runtime:evaluation_listener"],
)

cel_android_library(
    name = "standard_functions_android",
    exports = [
        "//runtime/src/main/java/dev/cel/runtime:standard_functions_android",
    ],
)

cel_android_library(
    name = "lite_runtime_android",
    exports = ["//runtime/src/main/java/dev/cel/runtime:lite_runtime_android"],
)

cel_android_library(
    name = "lite_runtime_factory_android",
    exports = ["//runtime/src/main/java/dev/cel/runtime:lite_runtime_factory_android"],
)

java_library(
    name = "base",
    exports = [
        "//runtime/src/main/java/dev/cel/runtime:base",
        "//runtime/src/main/java/dev/cel/runtime:metadata",
    ],
)

java_library(
    name = "lite_runtime_impl",
    visibility = ["//:internal"],
    exports = ["//runtime/src/main/java/dev/cel/runtime:lite_runtime_impl"],
)

cel_android_library(
    name = "lite_runtime_impl_android",
    visibility = ["//:internal"],
    exports = ["//runtime/src/main/java/dev/cel/runtime:lite_runtime_impl_android"],
)
